package com.pz.gulimall.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pz.gulimall.common.to.ShopCarItemTo;
import com.pz.gulimall.product.entity.ShopcarItemEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShopCarDao extends BaseMapper<ShopcarItemEntity> {
    List<ShopcarItemEntity> queryByLoginIds(@Param("loginIds") List<String> loginIds);

    List<ShopcarItemEntity> queryBathByLoginIdAndSkuId(@Param("shopcarItems") List<ShopcarItemEntity> shopcarItems);

    boolean updateByLoginIdAndSkuId(@Param("shopcarItems") List<ShopcarItemEntity> shopcarItems);

    boolean deleteByLoginIdAndSkuIds(@Param("loginId") String loginId, @Param("skuIds") List<Long> skuIds);
}
